package com.stt.weather.design.observer.impl;

import com.stt.weather.model.WeatherData;
import com.stt.weather.design.observer.WeatherObserver;
import com.stt.weather.design.template.NotificationTemplate;
import org.springframework.stereotype.Component;

@Component
public class AppPushObserver extends NotificationTemplate implements WeatherObserver {
    
    @Override
    public void update(WeatherData weatherData) {
        processNotification(weatherData);
    }

    /**
     * 每一个推送方式的发送消息具体逻辑不通
     * @param content 通知内容
     */
    @Override
    protected void send(String content) {
        System.out.println("发送APP推送通知：" + content);
    }
    
    @Override
    public String getType() {
        return "APP_PUSH";
    }
} 